/**
 * 111 api 封装
 *
 * @Author:    zxp
 * @Date:      2024-09-27 09:37:05
 * @Copyright  11111
 */
import {postRequest, getRequest} from '/@/lib/axios';

export const datasourceApi = {

    /**
     * 分页查询  @author  zxp
     */
    queryPage: (param) => {
        return postRequest('/datasource/queryPage', param);
    },

    /**
     * 增加  @author  zxp
     */
    add: (param) => {
        return postRequest('/datasource/add', param);
    },

    /**
     * 修改  @author  zxp
     */
    update: (param) => {
        return postRequest('/datasource/update', param);
    },


    /**
     * 删除  @author  zxp
     */
    delete: (id) => {
        return getRequest(`/datasource/delete/${id}`);
    },

    /**
     * 批量删除  @author  zxp
     */
    batchDelete: (idList) => {
        return postRequest('/datasource/batchDelete', idList);
    },

    mysqlconnect: (param) => {
        return postRequest('/datasource/mysqlconnect', param);
    },

    mysqlConnectTest: (param) => {
        return postRequest('/datasource/mysqlconnecttest', param);
    },

};
